<extend name="Public:base" />

<block name="content">
    <div class="row">
        <div class="col-lg-12">
            <h3 class="page-header"><em class="glyphicon glyphicon-cloud-upload"></em> 
            {$type} 
            <span class="xyh-pos">
                <i class="glyphicon glyphicon-log-out"></i>
                <if condition='ACTION_NAME eq "index"'>
                    <foreach name='poscate' item='v'>
                    <a href="{:U('' . ucfirst($v['tablename']) .'/index', array('pid' => $v['id']))}">{$v.name} </a> <em class="glyphicon glyphicon-menu-right"></em> 
                    </foreach>
                </if>
            </span>         
            </h3>
            

            <if condition="$subcate">
            <nav class="navbar navbar-default">
                <div class="container-fluid">
                    <div class="navbar-header">
                        <span class="navbar-text">子栏目：</span>
                        <foreach name='subcate' item='v'>
                            <a href="{:U(''. ucfirst($v['tablename']) . '/index', array('pid' => $v['id']))}" class="btn btn-sm btn-default navbar-btn">{$v.name}<notempty name="v['child']">&there4;</notempty></a>
                        </foreach>
                    </div>
                </div>
            </nav>
            </if>
        </div>
        
    </div>

    <div class="row margin-botton">
        <div class="col-sm-6 column">
            <div class="btn-group btn-group-md">
            <if condition='ACTION_NAME eq "index"'>
                <button class="btn btn-primary" type="button" onclick="goUrl('{:U('add', array('pid'=>$pid))}')"><em class="glyphicon glyphicon-plus-sign"></em> 添加导师</button>
                 <button class="btn btn-default" type="button" onclick="toGetSubmit('{:U('move', array('pid' => $pid))}', {:C('URL_MODEL')}, '{:C('URL_PATHINFO_DEPR')}')"><em class="glyphicon glyphicon-th-list"></em> 移动</button>                 
                 <button class="btn btn-default" type="button" onclick="doConfirmBatch('{:U('del', array('batchFlag' => 1,'pid' => $pid))}', '确实要删除选择项吗？')"><em class="glyphicon glyphicon-remove-circle"></em> 删除</button>                 
                 <button class="btn btn-default" type="button" onclick="goUrl('{:U('trach', array('pid' => $pid))}')"><em class="glyphicon glyphicon-trash"></em> 回收站</button>
            <else/>
                <button class="btn btn-primary" type="button" onclick="goUrl('{:U('index', array('pid'=>$pid))}')"><em class="glyphicon glyphicon-chevron-left"></em> 返回</button>
                 <button class="btn btn-default" type="button" onclick="doGoBatch('{:U('restore',  array('batchFlag' => 1, 'pid' => $pid))}')"><em class="glyphicon glyphicon-retweet"></em> 还原</button>                 
                 <button class="btn btn-default" type="button" onclick="doConfirmBatch('{:U('clear', array('batchFlag' => 1, 'pid' => $pid))}', '确实要彻底删除选择项吗？')"><em class="glyphicon glyphicon-remove-circle"></em> 彻底删除</button> 
            </if>

            </div>
        </div>
        <div class="col-sm-6 text-right">
            <if condition='ACTION_NAME eq "index"'>
                <form class="form-inline" method="post" action="{:U('index')}">
                  <div class="form-group">
                    <label class="sr-only" for="inputKeyword">关键字</label>
                    <input type="text" class="form-control" name="keyword" id="inputKeyword" placeholder="关键字" value="{$keyword}">
                  </div>
                  <input type="hidden" name="pid" value="{$pid}">
                  <button type="submit" class="btn btn-default">搜索</button>
                </form>
            </if>
        </div>
    </div>

    <div class="row">
        <div class="col-lg-12">
            <form action="" method="post" id="form_do" name="form_do">
                <div class="table-responsive">
                    <table class="table table-hover xyh-table-bordered-out">
                        <thead>
                            <tr class="active">
                                <th><input type="checkbox" id="check"></th>
                                <th>编号</th>
                                <th>标题</th>
                                <th>名字</th>
                                <th>职称</th>
                                <th>学校</th>
                                <th>年龄</th>
                                <th>学历</th>
                                <th>分类</th>
                                <th>点击数</th>
                                <th>发布时间</th>
                                <th class="text-right">操作</th>
                            </tr>
                        </thead>
                        <tbody>
                        <foreach name='vlist' item='v'>
                        <tr>
                            <td><input type="checkbox" name="key[]" value="{$v.id}"></td>
                            <td>{$v.id}</td>
                            <td class="aleft" style="color:{$v.color}">{$v.title}<if condition="$v.flag gt 0"><span style="color:#079B04;">[{$v.flag|flag2Str}]</span></if></td>
                            <td>{$v.name}</td>
                            <td>{$v.job}</td>
                            <td>{$v.school}</td>
                            <td>{$v.age}</td>
                            <td>{$v.edu}</td>
                            <td>{$v.catename}</td>
                            <td>{$v.click}</td>
                            <td>{$v.publishtime|date='Y-m-d H:i:s', ###}</td>
                            <td class="text-right">
                            <if condition='ACTION_NAME eq "index"'>
                            <a href="{$v|view_url}" target="_blank" class="label label-info">查看</a>
                            <a href="{:U('edit',array('id' => $v['id'],'pid' => $pid), '')}" class="label label-success">编辑</a>
                            <a href="javascript:;" onclick="toConfirm('{:U('del',array('id' => $v['id'], 'pid' => $pid), '')}', '确实要删除吗？')" class="label label-danger">删除</a>
                            <else/>
                            <a href="{:U('restore',array('id' => $v['id'], 'pid' => $pid), '')}" class="label label-info">还原</a>
                            <a href="javascript:;" onclick="toConfirm('{:U('clear',array('id' => $v['id'], 'pid' => $pid), '')}', '确实要彻底删除吗？')" class="label label-danger">彻底删除</a>
                            </if>
                            </td>
                        </tr>
                        </foreach>
                        </tbody>
                    </table>
                </div>
            </form>

            <div class="row clearfix">
                <div class="col-md-12 column">
                    <div class="xyh-page">
                        {$page}
                    </div>
                </div>
            </div>

            
        </div>
    </div>

    </block>